<div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_html">
    <div class="form-group"> 
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"><label>Start date</label></div>
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"><label>Start Time</label></div>
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"><label>End Time</label></div>
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"></div>        
    </div>


    <?php
    for ($dayIndex = 0; $dayIndex < count($daySesion); $dayIndex++) {
        $daySessionIs_flexible = ($daySesion[$dayIndex]->is_flexible == 1) ? '1' : '0';
        $addClass = ($daySesion[$dayIndex]->is_flexible == 1) ? '' : 'hastimePicker requiredfield';
        ?>
        <div class="form-group">
            <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_<?php echo $dayIndex; ?>">

                <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                 <span class="class-arrow12"></span>
                    <?php echo CHtml::dropDownList('CourseBatcheDaySession[CourseBatche][' . $batchIndex . '][ClassVenue][' . $venueIndex . '][schedule_id][]', $daySesion[$dayIndex]->schedule_id, getAllSchedule('course'), array('class' => 'form-control book-control courseselectBox requiredfield ClassDaySession_schedule_id_' . $dayIndex, 'id' => 'course_venue_' . $venueIndex . '_batch_' . $batchIndex . '_daySession_schedule_id_' . $dayIndex)); ?>
                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_schedule_id_<?php echo $dayIndex; ?>" style="display:none">Schedule cannot be blank.</div>
                    

                </div>
                <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                    <div class="input-append bootstrap-timepicker time-sin">
                        <input onclick="hastimePicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id);"  name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_from][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dayIndex; ?>" type="text" onkeypress="return isNumberKey(event)" class="add-on book-control time-sin <?php echo $addClass; ?> " value="<?php echo $daySesion[$dayIndex]->time_from; ?>" onchange="timeCheck(this.id)">
                        <div class="errorMessage" id="error_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dayIndex; ?>" style="display:none">Start time cannot be blank.</div>
                    </div>    </div>

                <div class="col-lg-6 col-md-6 col-sm-6 course-pdr column6">
                    <div class="col-lg-7 col-md-7 col-sm-7 column6">
                        <div class="input-append bootstrap-timepicker time-sin">
                            <input name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_to][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dayIndex; ?>" class="add-on book-control time-sin <?php echo $addClass; ?>" onclick="hastimePicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id)" type="text"   size="10" value="<?php echo $daySesion[$dayIndex]->time_to; ?>" onchange="timeCheck(this.id)">
                            <div class="errorMessage" id="error_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dayIndex; ?>" style="display:none">End time cannot be blank.</div>
                            <div class="errorMessage" id="endTime_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dayIndex; ?>" ></div>
                        </div>    </div>

                    <div class="col-lg-5 col-md-5 col-sm-5 column5"><div class="batch-flexible">
                            <input <?php if ($daySesion[$dayIndex]->is_flexible) { ?>checked="checked"<?php } ?> type="checkbox" class="isdaySesionFlexble" value="<?php echo $daySesion[$dayIndex]->is_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexible_<?php echo $dayIndex; ?>"onclick="datedaySesionisFlexble(this.id)" name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexible][]" >
                            <label for="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexible_<?php echo $dayIndex; ?>"> Flexible </label><input type="hidden" name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexiblevalue][]" value="<?php echo $daySessionIs_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexiblevalue_<?php echo $dayIndex; ?>"/>
                            <?php if ($dayIndex > 0) { ?><p class="isFlexbleRemove"><a class="link-remove" id="remove_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_<?php echo $dayIndex; ?>" onclick="removeDaySession(this.id);"><span>Remove</span></a></p><?php } ?>
                        </div>
                    </div> </div>                                                       	

            </div>
            <div class="clearfix"></div></div>

        <?php
    }
    ?>

</div>